window.onload = function() {
	var APP_ID = 'eG22PNfwqck3fDTem41ACiNU-gzGzoHsz';
	var APP_KEY = 'Y8VoXz0cIzsJVbpctUAJXAAh';
	AV.init({
		appId: APP_ID,
		appKey: APP_KEY
	});
	pddenglu();
}

function supportCss3(style) {
	var prefix = ['webkit', 'Moz', 'ms', 'o'],
		i,
		humpString = [],
		htmlStyle = document.documentElement.style,
		_toHumb = function(string) {
			return string.replace(/-(\w)/g, function($0, $1) {
				return $1.toUpperCase();
			});
		};

	for(i in prefix)
		humpString.push(_toHumb(prefix[i] + '-' + style));

	humpString.push(_toHumb(style));

	for(i in humpString)
		if(humpString[i] in htmlStyle) return true;

	return false;
}

if(!supportCss3('animation-name')) {
	$(".nature").each(function() {
		var $this = $(this).children().eq(1);
		var $lefta = $this.children().eq(0);
		$this.mouseover(function() {
			$lefta.animate({
				opacity: '0',
				marginLeft: '-20px'
			});
			$lefta.animate({
				marginLeft: '20px',
				opacity: '1',
				duration: 2000
			});
		})
	})

	$(".pulse").each(function() {
		$(this).mouseover(function() {
			var width = parseInt($(this).css("width")) / 10;
			$(this).animate({
				width: "+=" + width + ""
			}, "slow");
			$(this).animate({
				width: "-=" + width + ""
			}, "slow");
		})
	})

	$(".tada").each(function() {
		$(this).mouseover(function() {
			var width = parseInt($(this).css("width")) / 10;
			$(this).animate({
				width: "+=" + width + "",
			}, 100);
			$(this).animate({
				width: "-=" + width + "",
			}, 100);
			$(this).animate({
				width: "+=" + width + "",
			}, 100);
			$(this).animate({
				width: "-=" + width + "",
			}, 100);
		})
	})
}